Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ

Node / reticulum / rrc-web rns://bfb3becae4b7568796ac5276b6bc5741/reticulum/rrc-web
Mirrored from https://github.com/kc1awv/rrc-web synced 31m ago


RRC Web - RRC client compatible with rrcd and a web based frontend


>RRC Web Client

As of Nomadnet version 1.1.0, RRC is implemented as a first-class RRC client. Development focus has been switched to Nomadnet. This repo serves as a historical archive and is not up to date with recent versions of rrcd.

A web-based client for RRC (Reticulum Relay Chat)

RRC Web provides a browser interface to connect
rrcd chat hubs over the
Reticulum Network, enabling group communication
without relying on traditional internet infrastructure.

Features

β€’ Browser-based Interface - Access RRC from any modern web browser
β€’ Multi-User Chat - Communicate with multiple users in real-time
β€’ Multi-room Chat - Join and participate in multiple chat rooms
β€’ Hub Discovery - Automatically discover RRC hubs on the network
β€’ Modern UI - Responsive interface built with Svelte and daisyUI
β€’ WebSocket Backend - Real-time communication between browser and
Reticulum network
β€’ Security Features - Optional authentication and SSL/TLS support
β€’ Security Headers - Built-in protection against common web vulnerabilities

Architecture

RRC Web consists of two main components:

1. Python Backend (T383838rrc_web/) - Bridges WebSocket connections to the
Reticulum network
2. Svelte Frontend (T383838svelte-frontend/) - Web UI for chat interaction

The backend runs a local HTTP/WebSocket server that your browser connects to,
while maintaining connections to RRC hubs over the Reticulum network. You can,
for example, run the backend on a Raspberry Pi connected to Reticulum, and
access the frontend from any device on your local network.

Prerequisites

β€’ Python 3.11 or higher
β€’ Node.js 16 or higher (only needed if rebuilding the frontend)
β€’ Reticulum - Installed and configured on your system

Installation

Quick Install

T282828
T8b949e# Clone the repository
git clone https://github.com/kc1awv/rrc-web.git
Tffa657cd rrc-web

T8b949e# Create and activate a virtual environment (optional but recommended)
python -m venv .venv
Tffa657source .venv/bin/activate T8b949e# On Windows use `.venv\Scripts\activate`

T8b949e# Install the package
pip install .

T8b949e# Or for development
pip install -e Ta5d6ff".[dev]"


Configuration

Configuration is done via a JSON file. You can start the client and it will
generate a default config file at T383838~/.rrc-web/config.json. You can also copy
the provided T383838config.example.json to that location and edit it as needed.

Usage

Starting the Client

T282828
T8b949e# Using the installed command
rrc-web

T8b949e# Or using the helper script
./run.sh

T8b949e# With custom port
./run.sh --port T79c0ff8080

T8b949e# With debug logging
./run.sh --debug


The web interface will automatically open in your default browser at
T383838http://localhost:8080.

Command Line Options (run.sh)

T282828
Options:
-p, --port PORT Set the server port Tff7b72(default: T79c0ff8080Tff7b72)
-c, --config FILE Use alternate config file
-d, --debug Enable debug logging
-v, --verbose Enable verbose logging
-h, --help Show Tffa657help message


Environment Variables

β€’ T383838RRC_WEB_PORT - Override server port
β€’ T383838RRC_WEB_CONFIG - Override config file path
β€’ T383838RRC_LOG_LEVEL - Set logging level (DEBUG, INFO, WARNING, ERROR)

Connecting to a Hub

1. Start the RRC Web Client
2. Enter the hub destination hash (if not in config)
3. Choose a nickname (if not in config)
4. Click "Connect"
5. Join rooms and start chatting!

Development

Running Tests (if available)

T282828
T8b949e# Run all tests
pytest

T8b949e# Run with coverage
pytest --covTff7b72=rrc_web tests/

T8b949e# Run specific test file
pytest tests/test_backend.py


Building the Frontend

If you need to modify the frontend:

T282828
Tffa657cd svelte-frontend

T8b949e# Install dependencies
npm install

T8b949e# Build for production
npm run build

T8b949e# Or use the build script
./build.sh


The built files will be output to T383838rrc_web/static-svelte/.

Code Formatting

T282828
T8b949e# Format code with black
black rrc_web/

T8b949e# Check with ruff
ruff check rrc_web/

T8b949e# Type checking with mypy
mypy rrc_web/


Configuration Options

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Option β”‚ Type β”‚ Description β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ T383838identity_path β”‚ string β”‚ Path to Reticulum identity file β”‚
β”‚ T383838dest_name β”‚ string β”‚ Reticulum destination name (e.g., "rrc.hub") β”‚
β”‚ T383838hub_hash β”‚ string β”‚ Hub destination hash (hex string) β”‚
β”‚ T383838nickname β”‚ string β”‚ Your display nickname β”‚
β”‚ T383838configdir β”‚ string/null β”‚ Reticulum config directory (null = default) β”‚
β”‚ T383838server_port β”‚ number β”‚ HTTP server port β”‚
β”‚ T383838server_host β”‚ string β”‚ HTTP server host ("localhost" or "0.0.0.0") β”‚
β”‚ T383838auto_join_room β”‚ string β”‚ Room to auto-join after connecting β”‚
β”‚ T383838theme β”‚ string β”‚ UI theme (currently only "dark") β”‚
β”‚ T383838enable_auth β”‚ boolean β”‚ Enable authentication (requires auth_token) β”‚
β”‚ T383838auth_token β”‚ string β”‚ Authentication token for login β”‚
β”‚ T383838enable_ssl β”‚ boolean β”‚ Enable SSL/TLS (HTTPS and WSS) β”‚
β”‚ T383838ssl_cert_path β”‚ string β”‚ Path to SSL certificate file β”‚
β”‚ T383838ssl_key_path β”‚ string β”‚ Path to SSL private key file β”‚
β”‚ T383838session_timeout_minutes β”‚ number β”‚ Session timeout in minutes (default: 60) β”‚
β”‚ T383838allowed_origins β”‚ array β”‚ Allowed CORS origins β”‚
β”‚ T383838enable_security_headers β”‚ boolean β”‚ Enable security headers (recommended) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Security Features

RRC Web includes optional security features designed for deployments where the
web interface may be accessible to others on the local network.

Quick Security Setup

The easiest way to set up security features is using the interactive setup
script:


T282828
python -m rrc_web.setup_security

This will guide you through enabling authentication and SSL/TLS with sensible
defaults.

You can verify your security configuration at any time:


T282828
./test_security.sh

Authentication

To enable authentication:

1. Generate an authentication token:
T282828
python -c Ta5d6ff"import secrets; print(secrets.token_urlsafe(32))"


2. Update your T383838config.json:
T282828
Tb4b4b4{
Tff7b72"enable_auth"Tb4b4b4: Tff7b72trueTb4b4b4,
Tff7b72"auth_token"Tb4b4b4: Ta5d6ff"your-generated-token-here"
Tb4b4b4}


3. Restart the application. Users will be prompted to enter the token before
accessing the interface.

SSL/TLS (HTTPS)

To enable SSL/TLS for encrypted connections:

1. Generate a self-signed certificate:
T282828
python -m rrc_web.generate_cert

Or with custom options:
T282828
python -m rrc_web.generate_cert --hostname myhost --days T79c0ff730


2. Update your T383838config.json:
T282828
Tb4b4b4{
Tff7b72"enable_ssl"Tb4b4b4: Tff7b72trueTb4b4b4,
Tff7b72"ssl_cert_path"Tb4b4b4: Ta5d6ff"~/.rrc-web/cert.pem"Tb4b4b4,
Tff7b72"ssl_key_path"Tb4b4b4: Ta5d6ff"~/.rrc-web/key.pem"
Tb4b4b4}


3. Restart the application. The server will now run on HTTPS.

4. Accept the self-signed certificate in your browser (you'll see a security
warning - this is expected for self-signed certificates).

Combined Authentication and SSL

For maximum security, enable both:

T282828
Tb4b4b4{
Tff7b72"enable_auth"Tb4b4b4: Tff7b72trueTb4b4b4,
Tff7b72"auth_token"Tb4b4b4: Ta5d6ff"your-token-here"Tb4b4b4,
Tff7b72"enable_ssl"Tb4b4b4: Tff7b72trueTb4b4b4,
Tff7b72"ssl_cert_path"Tb4b4b4: Ta5d6ff"~/.rrc-web/cert.pem"Tb4b4b4,
Tff7b72"ssl_key_path"Tb4b4b4: Ta5d6ff"~/.rrc-web/key.pem"Tb4b4b4,
Tff7b72"session_timeout_minutes"Tb4b4b4: T79c0ff60Tb4b4b4,
Tff7b72"allowed_origins"Tb4b4b4: Tb4b4b4[Ta5d6ff"https://localhost:8080"Tb4b4b4]
Tb4b4b4}


Security Best Practices

β€’ Keep your auth token secret - Don't share it or commit it to version
control
β€’ Use strong tokens - Always generate tokens using cryptographically secure
methods
β€’ Limit network exposure - Use T383838"server_host": "localhost" unless you need
remote access (for example, running on a Raspberry Pi and accessing the web
interface from another device)
β€’ Regular token rotation - Periodically generate new auth tokens
β€’ HTTPS for remote access - Always enable SSL when accessing from other
devices
β€’ Session timeout - Set an appropriate session timeout for your use case
β€’ Monitor access - Check logs for unauthorized access attempts

Security Headers

By default, RRC Web includes security headers to protect against common
vulnerabilities:

β€’ Content Security Policy (CSP) - Prevents XSS attacks
β€’ X-Frame-Options - Prevents clickjacking
β€’ X-Content-Type-Options - Prevents MIME-type sniffing
β€’ Referrer-Policy - Controls referrer information
β€’ Permissions-Policy - Restricts browser features

These can be disabled if needed by setting T383838"enable_security_headers": false in
your config.

Troubleshooting

Connection Issues

β€’ Ensure Reticulum is properly configured and running
β€’ Verify the hub hash is correct
β€’ Check that your Reticulum interface is connected

Port Already in Use

If port 8080 is already in use:
T282828
./run.sh --port T79c0ff8081


Or set in config:
T282828
Tb4b4b4{
Tff7b72"server_port"Tb4b4b4: T79c0ff8081
Tb4b4b4}


Browser Not Opening

Manually navigate to T383838http://localhost:8080 in your browser.

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Links

β€’ Homepage: https://github.com/kc1awv/rrc-web
β€’ Issues: https://github.com/kc1awv/rrc-web/issues
β€’ rrcd: https://github.com/kc1awv/rrcd
β€’ Reticulum Network: https://reticulum.network


Note: RRC Web is in active development (Alpha). Expect changes and
improvements.

Served by rngit 1.4.2 - Generated in 0.06s